package com.ruoyi.ftrl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ftrl.mapper.HeatingManagementMapper;
import com.ruoyi.ftrl.domain.HeatingManagement;
import com.ruoyi.ftrl.service.IHeatingManagementService;

/**
 * 采暖季管理信息Service业务层处理
 * 
 * @author dihang
 * @date 2024-07-24
 */
@Service
public class HeatingManagementServiceImpl implements IHeatingManagementService 
{
    @Autowired
    private HeatingManagementMapper heatingManagementMapper;

    /**
     * 查询采暖季管理信息
     * 
     * @param id 采暖季管理信息主键
     * @return 采暖季管理信息
     */
    @Override
    public HeatingManagement selectHeatingManagementById(Long id)
    {
        return heatingManagementMapper.selectHeatingManagementById(id);
    }

    /**
     * 查询采暖季管理信息列表
     * 
     * @param heatingManagement 采暖季管理信息
     * @return 采暖季管理信息
     */
    @Override
    public List<HeatingManagement> selectHeatingManagementList(HeatingManagement heatingManagement)
    {
        return heatingManagementMapper.selectHeatingManagementList(heatingManagement);
    }

    /**
     * 新增采暖季管理信息
     * 
     * @param heatingManagement 采暖季管理信息
     * @return 结果
     */
    @Override
    public int insertHeatingManagement(HeatingManagement heatingManagement)
    {
        heatingManagement.setCreateTime(DateUtils.getNowDate());
        return heatingManagementMapper.insertHeatingManagement(heatingManagement);
    }

    /**
     * 修改采暖季管理信息
     * 
     * @param heatingManagement 采暖季管理信息
     * @return 结果
     */
    @Override
    public int updateHeatingManagement(HeatingManagement heatingManagement)
    {
        heatingManagement.setUpdateTime(DateUtils.getNowDate());
        return heatingManagementMapper.updateHeatingManagement(heatingManagement);
    }

    /**
     * 批量删除采暖季管理信息
     * 
     * @param ids 需要删除的采暖季管理信息主键
     * @return 结果
     */
    @Override
    public int deleteHeatingManagementByIds(Long[] ids)
    {
        return heatingManagementMapper.deleteHeatingManagementByIds(ids);
    }

    /**
     * 删除采暖季管理信息信息
     * 
     * @param id 采暖季管理信息主键
     * @return 结果
     */
    @Override
    public int deleteHeatingManagementById(Long id)
    {
        return heatingManagementMapper.deleteHeatingManagementById(id);
    }
}
